package com.galaxy.order.api;

import com.galaxy.common.core.domain.R;
import com.galaxy.order.config.FeignConfig;
import com.galaxy.order.domain.CheckStock;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 商品服务接口
 */
@FeignClient(
    contextId = "RemoteDeviceService",
    value = "galaxy-device",
    fallbackFactory = RemoteDeviceFallbackFactory.class,
    configuration = FeignConfig.class
)
public interface RemoteDeviceService {

    /**
     * 修改库存
     *
     * @return 商品信息
     */
    @PutMapping("/api/stock/updateStock")
    R<Boolean> update(List<CheckStock> checkStockList);

    @GetMapping("/api/base/getDeviceNo/{id}")
    R<String> getInfo(@PathVariable("id") Long id);
}
